package com.mibotiquin.menu;

import com.mibotiquin.R;

import android.app.Activity;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class InsertarFarmacosActivity extends Activity{

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.farmacos_layout2);
		
		final EditText buscarSintomas = (EditText)findViewById(R.id.etSintomas);  
		final Button aceptar = (Button)findViewById(R.id.bBuscar);
		
		Bundle bundle = getIntent().getExtras();
		
		
		
		aceptar.setOnTouchListener(new OnTouchListener(){
			public boolean onTouch(View v, MotionEvent event) {
			// TODO Auto-generated method stub
				
				
				Intent intent = new Intent(InsertarFarmacosActivity.this, MostrarSintomasActivity.class);
				Bundle bundle = new Bundle();
				bundle.putString("Medicamento",buscarSintomas.getText().toString());
				intent.putExtras(bundle);
				
				
				startActivity(intent);
				
				/*Context context = getApplicationContext();
				String text = buscarSintomas.getText().toString();
				int duration = Toast.LENGTH_SHORT;
				
				Toast toast = Toast.makeText(context, text, duration);
				toast.show();*/
				
				
				
			
				return false;
			
		}
    	
    	
    });
		
	}
	
}
